from wcs.libs.items import items
from wcs.libs.players import players

itemName = "Boots of Speed"
item = items.addItem(itemName)
item.setGroup("enhancement")
item.setCost(4000)
item.setDescription("Gain a small speed boost.")
item.setMaxCount(2)
item.aliveToUse = True

def wcs_item_bought(event_var):
    """
    Executed when an item has been bought. If the item is this item, then
    increment the player's speed.
    """
    userid = event_var['userid']
    if event_var["item"] == itemName:
        players[userid].speedAdd(.1)